package com.springboot.jwt.exception;

public enum ExceptionEnum implements BaseErrorInfoInterface {

    // 数据操作错误定义
    SUCCESS("200", "成功"),
    BODY_NOT_MATCH("4000", "请求的数据格式不对"),
    SIGNATURE_NOT_MATCH("4001", "请求的数字前面不匹配"),
    NOT_FOUND("404", "未找到该资源"),
    INTERNAL_SERVER_ERROR("500", "服务器内部错误"),
    SERVER_BUSY("503", "服务器忙，请稍后再试"),
    PARAMS_NOT_CONVERT("4002", "类型转换错误");

    /**
     * 错误码
     */
    private final String resultCode;

    /**
     * 错误描述
     */
    private final String resultMsg;

    ExceptionEnum(String resultCode, String resultMsg) {
        this.resultCode = resultCode;
        this.resultMsg = resultMsg;
    }

    @Override
    public String getResultCode() {
        return this.resultCode;
    }

    @Override
    public String getResultMsg() {
        return this.resultMsg;
    }
}
